<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:jwork="http://irian.at/jsfatwork"
      xmlns:rich="http://richfaces.org/rich">

<ui:composition template="/templates/template.xhtml">
    <ui:define name="heading">
        <h:outputText value="Account Summary" />
    </ui:define>
    <ui:define name="content">
        <h:panelGrid columns="2">
            <h:outputText value="Clearing Account" />
            <h:outputText value="#{accountsBean.clearingAccount.clearingAccountBalanceAmount}" />
        </h:panelGrid>

        <rich:dataTable value="#{accountsBean.clearingAccount.clearingAccountPositions}" var="postion" sortMode="true">
            <rich:column>
                <f:facet name="header">
                    Booking Date
                </f:facet>
                <h:outputText value="#{postion.bookingDateTime}" />
            </rich:column>
            <rich:column>
                <f:facet name="header">
                    Amount
                </f:facet>
                <h:outputText value="#{postion.amount}" />
            </rich:column>
        </rich:dataTable>

        <p>&#160;</p>

        <h:panelGrid columns="2">
            <h:outputText value="Securites Account" />
            <h:outputText value="#{accountsBean.securitiesAccountBalance}" />
        </h:panelGrid>

        <rich:dataTable value="#{accountsBean.securitiesAccount.securitiesAccountPositions}" var="postion" sortMode="true">
            <rich:column>
                <f:facet name="header">
                    Booking Date
                </f:facet>
                <h:outputText value="#{postion.bookingDateTime}" />
            </rich:column>
            <rich:column>
                <f:facet name="header">
                    Symbol
                </f:facet>
                <h:outputText value="#{postion.stock.symbol}" />
            </rich:column>
            <rich:column>
                <f:facet name="header">
                    Quantity
                </f:facet>
                <h:outputText value="#{postion.quantity}" />
            </rich:column>
        </rich:dataTable>
    </ui:define>
</ui:composition>

</html>